package com.kqb.common.domain.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;


import javax.validation.constraints.Size;
import java.io.Serializable;


/**
 * user
 */
@Data
@ApiModel("用户")
@NoArgsConstructor
public class User implements Serializable {
    @ApiModelProperty("用户id")
    private Integer id;
    @Size(max = 8, min = 3, message = "账号长度必须为3~8")
    @ApiModelProperty(value = "账号", required = true)
    private String account;
    @ApiModelProperty(value = "密码", required = true)
    @Size(max = 12, min = 6, message = "账号长度必须为6~12")
    private String password;

    /**
     * 1 平台用户
     * 2 客户
     * 3 供应商
     * 4 货代
     */
    @ApiModelProperty(value = "用户类型 1 平台用户 2 客户 3 供应商 4 货代", required = true)
    private Byte type;


    public User(String account, String password, Byte type) {
        this.account = account;
        this.password = password;
        this.type = type;
    }

    /**
     * 1 正常
     * 2 禁用
     * 3..。。
     */
    private Byte status;


    private static final long serialVersionUID = 1L;
}